DROP TABLE IF EXISTS `sakura_dept`;
CREATE TABLE `sakura_dept`
(
    `id`         bigint(20) NOT NULL COMMENT '主键',
    `tenant_id`  varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
    `parent_id`  bigint(20) NULL DEFAULT 0 COMMENT '父主键',
    `ancestors`  varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '祖级列表',
    `dept_name`  varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名',
    `full_name`  varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门全称',
    `sort`       int(11) NULL DEFAULT NULL COMMENT '排序',
    `remark`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
    `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表';

-- ----------------------------
-- Records of sakura_dept
-- ----------------------------
BEGIN;
INSERT INTO `sakura_dept`
VALUES (1123598813738675201, '000000', 0, '0', '刀锋科技', '江苏刀锋科技有限公司', 1, NULL, 0),
       (1123598813738675202, '000000', 1123598813738675201, '0,1123598813738675201', '常州刀锋', '常州刀锋科技有限公司', 1, NULL, 0),
       (1123598813738675203, '000000', 1123598813738675201, '0,1123598813738675201', '苏州刀锋', '苏州刀锋科技有限公司', 1, NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for sakura_dict
-- ----------------------------
DROP TABLE IF EXISTS `sakura_dict`;
CREATE TABLE `sakura_dict`
(
    `id`         bigint(20) NOT NULL COMMENT '主键',
    `parent_id`  bigint(20) NULL DEFAULT 0 COMMENT '父主键',
    `code`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典码',
    `dict_key`   int(2) NULL DEFAULT NULL COMMENT '字典值',
    `dict_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典名称',
    `sort`       int(11) NULL DEFAULT NULL COMMENT '排序',
    `remark`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典备注',
    `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典表';

-- ----------------------------
-- Records of sakura_dict
-- ----------------------------
BEGIN;
INSERT INTO `sakura_dict`
VALUES (1123598814738675201, 0, 'sex', -1, '性别', 1, NULL, 0),
       (1123598814738675202, 1123598814738675201, 'sex', 1, '男', 1, NULL, 0),
       (1123598814738675203, 1123598814738675201, 'sex', 2, '女', 2, NULL, 0),
       (1123598814738675204, 0, 'notice', -1, '通知类型', 2, NULL, 0),
       (1123598814738675205, 1123598814738675204, 'notice', 1, '发布通知', 1, NULL, 0),
       (1123598814738675206, 1123598814738675204, 'notice', 2, '批转通知', 2, NULL, 0),
       (1123598814738675207, 1123598814738675204, 'notice', 3, '转发通知', 3, NULL, 0),
       (1123598814738675208, 1123598814738675204, 'notice', 4, '指示通知', 4, NULL, 0),
       (1123598814738675209, 1123598814738675204, 'notice', 5, '任免通知', 5, NULL, 0),
       (1123598814738675210, 1123598814738675204, 'notice', 6, '事务通知', 6, NULL, 0),
       (1123598814738675211, 0, 'menu_category', -1, '菜单类型', 3, NULL, 0),
       (1123598814738675212, 1123598814738675211, 'menu_category', 1, '菜单', 1, NULL, 0),
       (1123598814738675213, 1123598814738675211, 'menu_category', 2, '按钮', 2, NULL, 0),
       (1123598814738675214, 0, 'button_func', -1, '按钮功能', 4, NULL, 0),
       (1123598814738675215, 1123598814738675214, 'button_func', 1, '工具栏', 1, NULL, 0),
       (1123598814738675216, 1123598814738675214, 'button_func', 2, '操作栏', 2, NULL, 0),
       (1123598814738675217, 1123598814738675214, 'button_func', 3, '工具操作栏', 3, NULL, 0),
       (1123598814738675218, 0, 'yes_no', -1, '是否', 5, NULL, 0),
       (1123598814738675219, 1123598814738675218, 'yes_no', 1, '否', 1, NULL, 0),
       (1123598814738675220, 1123598814738675218, 'yes_no', 2, '是', 2, NULL, 0),
       (1123598814738675231, 0, 'data_scope_type', -1, '数据权限', 8, NULL, 0),
       (1123598814738675232, 1123598814738675231, 'data_scope_type', 1, '全部可见', 1, NULL, 0),
       (1123598814738675233, 1123598814738675231, 'data_scope_type', 2, '本人可见', 2, NULL, 0),
       (1123598814738675234, 1123598814738675231, 'data_scope_type', 3, '所在机构可见', 3, NULL, 0),
       (1123598814738675235, 1123598814738675231, 'data_scope_type', 4, '所在机构及子级可见', 4, NULL, 0),
       (1123598814738675236, 1123598814738675231, 'data_scope_type', 5, '自定义', 5, NULL, 0),
       (1123598814738777220, 0, 'post_category', -1, '岗位类型', 12, NULL, 0),
       (1123598814738777221, 1123598814738777220, 'post_category', 1, '高层', 1, NULL, 0),
       (1123598814738777222, 1123598814738777220, 'post_category', 2, '中层', 2, NULL, 0),
       (1123598814738777223, 1123598814738777220, 'post_category', 3, '基层', 3, NULL, 0),
       (1123598814738777224, 1123598814738777220, 'post_category', 4, '其他', 4, NULL, 0),
       (1123598814738777230, 0, 'region', -1, '行政区划', 13, NULL, 0),
       (1123598814738777231, 1123598814738777230, 'region', 0, '国家', 0, NULL, 0),
       (1123598814738777232, 1123598814738777230, 'region', 1, '省份/直辖市', 1, NULL, 0),
       (1123598814738777233, 1123598814738777230, 'region', 2, '地市', 2, NULL, 0),
       (1123598814738777234, 1123598814738777230, 'region', 3, '区县', 3, NULL, 0),
       (1123598814738777235, 1123598814738777230, 'region', 4, '乡镇', 4, NULL, 0),
       (1123598814738777236, 1123598814738777230, 'region', 5, '村委', 5, NULL, 0);
COMMIT;


DROP TABLE IF EXISTS `sakura_menu`;
CREATE TABLE `sakura_menu`
(
    `id`         bigint(20) NOT NULL COMMENT '主键',
    `parent_id`  bigint(20) NULL DEFAULT 0 COMMENT '父级菜单',
    `code`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单编号',
    `name`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单名称',
    `alias`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单别名',
    `path`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求地址',
    `source`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单资源',
    `sort`       int(2) NULL DEFAULT NULL COMMENT '排序',
    `category`   int(2) NULL DEFAULT NULL COMMENT '菜单类型',
    `action`     int(2) NULL DEFAULT 0 COMMENT '操作按钮类型',
    `is_open`    int(2) NULL DEFAULT 1 COMMENT '是否打开新页面',
    `remark`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
    `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表';

-- ----------------------------
-- Records of sakura_menu
-- ----------------------------
BEGIN;
INSERT INTO `sakura_menu`
VALUES (1123598815738675201, 0, 'desk', '工作台', 'menu', '/desk', 'iconfont iconicon_airplay', 1, 1, 0, 1, NULL, 0),
       (1123598815738675202, 1123598815738675201, 'notice', '通知公告', 'menu', '/desk/notice', 'iconfont iconicon_sms', 1,
        1, 0, 1, NULL, 0),
       (1123598815738675203, 0, 'system', '系统管理', 'menu', '/system', 'iconfont iconicon_setting', 99, 1, 0, 1, NULL, 0),
       (1123598815738675204, 1123598815738675203, 'user', '用户管理', 'menu', '/system/user', 'iconfont iconicon_principal',
        1, 1, 0, 1, NULL, 0),
       (1123598815738675205, 1123598815738675203, 'dept', '部门管理', 'menu', '/system/dept', 'iconfont iconicon_group', 2,
        1, 0, 1, NULL, 0),
       (1123598815738675206, 1123598815738675203, 'dict', '字典管理', 'menu', '/system/dict',
        'iconfont iconicon_addresslist', 3, 1, 0, 1, NULL, 0),
       (1123598815738675207, 1123598815738675203, 'menu', '菜单管理', 'menu', '/system/menu',
        'iconfont iconicon_subordinate', 4, 1, 0, 1, NULL, 0),
       (1123598815738675209, 1123598815738675203, 'param', '参数管理', 'menu', '/system/param',
        'iconfont iconicon_community_line', 6, 1, 0, 1, NULL, 0),
       (1123598815738675210, 0, 'monitor', '系统监控', 'menu', '/monitor', 'iconfont icon-yanzhengma', 3, 1, 0, 1, NULL, 0),
       (1123598815738675211, 1123598815738675210, 'doc', '接口文档', 'menu', 'http://localhost/doc.html',
        'iconfont iconicon_study', 1, 1, 0, 2, NULL, 0),
       (1123598815738675212, 1123598815738675210, 'admin', '服务治理', 'menu', 'http://localhost:7002',
        'iconfont icon-canshu', 2, 1, 0, 2, NULL, 0),
       (1123598815738675213, 1123598815738675210, 'log', '日志管理', 'menu', '/monitor/log', 'iconfont iconicon_doc', 3, 1,
        0, 1, NULL, 0),
       (1123598815738675214, 1123598815738675213, 'log_usual', '通用日志', 'menu', '/monitor/log/usual', NULL, 1, 1, 0, 1,
        NULL, 0),
       (1123598815738675215, 1123598815738675213, 'log_api', '接口日志', 'menu', '/monitor/log/api', NULL, 2, 1, 0, 1, NULL,
        0),
       (1123598815738675216, 1123598815738675213, 'log_error', '错误日志', 'menu', '/monitor/log/error', NULL, 3, 1, 0, 1,
        NULL, 0),
       (1123598815738675217, 0, 'tool', '研发工具', 'menu', '/tool', 'iconfont icon-wxbgongju', 4, 1, 0, 1, NULL, 0),
       (1123598815738675218, 1123598815738675217, 'code', '代码生成', 'menu', '/tool/code', 'iconfont iconicon_savememo', 1,
        1, 0, 1, NULL, 0),
       (1123598815738675219, 1123598815738675202, 'notice_add', '新增', 'add', '/desk/notice/add', 'plus', 1, 2, 1, 1,
        NULL, 0),
       (1123598815738675220, 1123598815738675202, 'notice_edit', '修改', 'edit', '/desk/notice/edit', 'form', 2, 2, 2, 1,
        NULL, 0),
       (1123598815738675221, 1123598815738675202, 'notice_delete', '删除', 'delete', '/api/sakura-desk/notice/remove',
        'delete', 3, 2, 3, 1, NULL, 0),
       (1123598815738675222, 1123598815738675202, 'notice_view', '查看', 'view', '/desk/notice/view', 'file-text', 4, 2,
        2, 1, NULL, 0),
       (1123598815738675223, 1123598815738675204, 'user_add', '新增', 'add', '/system/user/add', 'plus', 1, 2, 1, 1, NULL,
        0),
       (1123598815738675224, 1123598815738675204, 'user_edit', '修改', 'edit', '/system/user/edit', 'form', 2, 2, 2, 1,
        NULL, 0),
       (1123598815738675225, 1123598815738675204, 'user_delete', '删除', 'delete', '/api/sakura-user/remove', 'delete', 3,
        2, 3, 1, NULL, 0),
       (1123598815738675226, 1123598815738675204, 'user_role', '角色配置', 'role', NULL, 'user-add', 4, 2, 1, 1, NULL, 0),
       (1123598815738675227, 1123598815738675204, 'user_reset', '密码重置', 'reset-password',
        '/api/sakura-user/reset-password', 'retweet', 5, 2, 1, 1, NULL, 0),
       (1123598815738675228, 1123598815738675204, 'user_view', '查看', 'view', '/system/user/view', 'file-text', 6, 2, 2,
        1, NULL, 0),
       (1123598815738675229, 1123598815738675205, 'dept_add', '新增', 'add', '/system/dept/add', 'plus', 1, 2, 1, 1, NULL,
        0),
       (1123598815738675230, 1123598815738675205, 'dept_edit', '修改', 'edit', '/system/dept/edit', 'form', 2, 2, 2, 1,
        NULL, 0),
       (1123598815738675231, 1123598815738675205, 'dept_delete', '删除', 'delete', '/api/sakura-system/dept/remove',
        'delete', 3, 2, 3, 1, NULL, 0),
       (1123598815738675232, 1123598815738675205, 'dept_view', '查看', 'view', '/system/dept/view', 'file-text', 4, 2, 2,
        1, NULL, 0),
       (1123598815738675233, 1123598815738675206, 'dict_add', '新增', 'add', '/system/dict/add', 'plus', 1, 2, 1, 1, NULL,
        0),
       (1123598815738675234, 1123598815738675206, 'dict_edit', '修改', 'edit', '/system/dict/edit', 'form', 2, 2, 2, 1,
        NULL, 0),
       (1123598815738675235, 1123598815738675206, 'dict_delete', '删除', 'delete', '/api/sakura-system/dict/remove',
        'delete', 3, 2, 3, 1, NULL, 0),
       (1123598815738675236, 1123598815738675206, 'dict_view', '查看', 'view', '/system/dict/view', 'file-text', 4, 2, 2,
        1, NULL, 0),
       (1123598815738675237, 1123598815738675207, 'menu_add', '新增', 'add', '/system/menu/add', 'plus', 1, 2, 1, 1, NULL,
        0),
       (1123598815738675238, 1123598815738675207, 'menu_edit', '修改', 'edit', '/system/menu/edit', 'form', 2, 2, 2, 1,
        NULL, 0),
       (1123598815738675239, 1123598815738675207, 'menu_delete', '删除', 'delete', '/api/sakura-system/menu/remove',
        'delete', 3, 2, 3, 1, NULL, 0),
       (1123598815738675240, 1123598815738675207, 'menu_view', '查看', 'view', '/system/menu/view', 'file-text', 4, 2, 2,
        1, NULL, 0),
       (1123598815738675241, 1123598815738675308, 'role_add', '新增', 'add', '/authority/role/add', 'plus', 1, 2, 1, 1,
        NULL, 0),
       (1123598815738675242, 1123598815738675308, 'role_edit', '修改', 'edit', '/authority/role/edit', 'form', 2, 2, 2, 1,
        NULL, 0),
       (1123598815738675243, 1123598815738675308, 'role_delete', '删除', 'delete', '/api/sakura-system/role/remove',
        'delete', 3, 2, 3, 1, NULL, 0),
       (1123598815738675244, 1123598815738675308, 'role_view', '查看', 'view', '/authority/role/view', 'file-text', 4, 2,
        2, 1, NULL, 0),
       (1123598815738675245, 1123598815738675209, 'param_add', '新增', 'add', '/system/param/add', 'plus', 1, 2, 1, 1,
        NULL, 0),
       (1123598815738675246, 1123598815738675209, 'param_edit', '修改', 'edit', '/system/param/edit', 'form', 2, 2, 2, 1,
        NULL, 0),
       (1123598815738675247, 1123598815738675209, 'param_delete', '删除', 'delete', '/api/sakura-system/param/remove',
        'delete', 3, 2, 3, 1, NULL, 0),
       (1123598815738675248, 1123598815738675209, 'param_view', '查看', 'view', '/system/param/view', 'file-text', 4, 2,
        2, 1, NULL, 0),
       (1123598815738675249, 1123598815738675214, 'log_usual_view', '查看', 'view', '/monitor/log/usual/view',
        'file-text', 4, 2, 2, 1, NULL, 0),
       (1123598815738675250, 1123598815738675215, 'log_api_view', '查看', 'view', '/monitor/log/api/view', 'file-text', 4,
        2, 2, 1, NULL, 0),
       (1123598815738675251, 1123598815738675216, 'log_error_view', '查看', 'view', '/monitor/log/error/view',
        'file-text', 4, 2, 2, 1, NULL, 0),
       (1123598815738675252, 1123598815738675218, 'code_add', '新增', 'add', '/tool/code/add', 'plus', 1, 2, 1, 1, NULL,
        0),
       (1123598815738675253, 1123598815738675218, 'code_edit', '修改', 'edit', '/tool/code/edit', 'form', 2, 2, 2, 1,
        NULL, 0),
       (1123598815738675254, 1123598815738675218, 'code_delete', '删除', 'delete', '/api/sakura-system/code/remove',
        'delete', 3, 2, 3, 1, NULL, 0),
       (1123598815738675255, 1123598815738675218, 'code_view', '查看', 'view', '/tool/code/view', 'file-text', 4, 2, 2, 1,
        NULL, 0),
       (1123598815738675256, 1123598815738675203, 'tenant', '租户管理', 'menu', '/system/tenant', 'iconfont icon-quanxian',
        7, 1, 0, 1, NULL, 0),
       (1123598815738675257, 1123598815738675256, 'tenant_add', '新增', 'add', '/system/tenant/add', 'plus', 1, 2, 1, 1,
        NULL, 0),
       (1123598815738675258, 1123598815738675256, 'tenant_edit', '修改', 'edit', '/system/tenant/edit', 'form', 2, 2, 2,
        1, NULL, 0),
       (1123598815738675259, 1123598815738675256, 'tenant_delete', '删除', 'delete', '/api/sakura-system/tenant/remove',
        'delete', 3, 2, 3, 1, NULL, 0),
       (1123598815738675260, 1123598815738675256, 'tenant_view', '查看', 'view', '/system/tenant/view', 'file-text', 4, 2,
        2, 1, NULL, 0),
       (1123598815738675261, 1123598815738675203, 'client', '应用管理', 'menu', '/system/client',
        'iconfont iconicon_mobilephone', 8, 1, 0, 1, NULL, 0),
       (1123598815738675262, 1123598815738675261, 'client_add', '新增', 'add', '/system/client/add', 'plus', 1, 2, 1, 1,
        NULL, 0),
       (1123598815738675263, 1123598815738675261, 'client_edit', '修改', 'edit', '/system/client/edit', 'form', 2, 2, 2,
        2, NULL, 0),
       (1123598815738675264, 1123598815738675261, 'client_delete', '删除', 'delete', '/api/sakura-system/client/remove',
        'delete', 3, 2, 3, 3, NULL, 0),
       (1123598815738675265, 1123598815738675261, 'client_view', '查看', 'view', '/system/client/view', 'file-text', 4, 2,
        2, 2, NULL, 0),
       (1123598815738675266, 1123598815738675217, 'datasource', '数据源管理', 'menu', '/tool/datasource',
        'iconfont icon-caidanguanli', 2, 1, 0, 1, NULL, 0),
       (1123598815738675267, 1123598815738675266, 'datasource_add', '新增', 'add', '/tool/datasource/add', 'plus', 1, 2,
        1, 1, NULL, 0),
       (1123598815738675268, 1123598815738675266, 'datasource_edit', '修改', 'edit', '/tool/datasource/edit', 'form', 2,
        2, 2, 2, NULL, 0),
       (1123598815738675269, 1123598815738675266, 'datasource_delete', '删除', 'delete',
        '/api/sakura-develop/datasource/remove', 'delete', 3, 2, 3, 3, NULL, 0),
       (1123598815738675270, 1123598815738675266, 'datasource_view', '查看', 'view', '/tool/datasource/view', 'file-text',
        4, 2, 2, 2, NULL, 0),
       (1123598815738675307, 0, 'authority', '权限管理', 'menu', '/authority', 'iconfont icon-bofangqi-suoping', 98, 1, 0,
        1, '', 0),
       (1123598815738675308, 1123598815738675307, 'role', '角色管理', 'menu', '/authority/role', 'iconfont iconicon_boss',
        1, 1, 0, 1, NULL, 0),
       (1123598815738675309, 1123598815738675307, 'data_scope', '数据权限', 'menu', '/authority/datascope',
        'iconfont icon-shujuzhanshi2', 2, 1, 0, 1, '', 0),
       (1123598815738675310, 1123598815738675309, 'data_scope_setting', '权限配置', 'setting', NULL, 'setting', 1, 2, 2, 1,
        NULL, 0),
       (1164733389668962251, 1123598815738675203, 'post', '岗位管理', 'menu', '/system/post', 'iconfont iconicon_message',
        2, 1, 0, 1, NULL, 0),
       (1164733389668962252, 1164733389668962251, 'post_add', '新增', 'add', '/system/post/add', 'plus', 1, 2, 1, 1, NULL,
        0),
       (1164733389668962253, 1164733389668962251, 'post_edit', '修改', 'edit', '/system/post/edit', 'form', 2, 2, 2, 1,
        NULL, 0),
       (1164733389668962254, 1164733389668962251, 'post_delete', '删除', 'delete', '/api/sakura-system/post/remove',
        'delete', 3, 2, 3, 1, NULL, 0),
       (1164733389668962255, 1164733389668962251, 'post_view', '查看', 'view', '/system/post/view', 'file-text', 4, 2, 2,
        1, NULL, 0),
       (1164733399668962201, 0, 'base', '基础配置', 'menu', '/base', 'iconfont iconicon_affiliations_li', 97, 1, 0, 1, NULL,
        0),
       (1164733399668962202, 1164733399668962201, 'region', '行政区划', 'menu', '/base/region', 'iconfont icon-iframe', 1,
        1, 0, 1, NULL, 0),
       (1164733399668962203, 1164733399668962202, 'region_add', '新增下级', 'add', '', '', 1, 2, 1, 1, NULL, 0),
       (1164733399668962204, 1164733399668962202, 'region_delete', '删除', 'delete', '/api/sakura-system/region/remove',
        '', 2, 2, 2, 1, NULL, 0),
       (1164733399668962205, 1164733399668962202, 'region_import', '导入', 'import', '', '', 3, 2, 3, 1, NULL, 0),
       (1164733399668962206, 1164733399668962202, 'region_export', '导出', 'export', '', '', 4, 2, 2, 1, NULL, 0),
       (1164733399668962207, 1164733399668962202, 'region_debug', '调试', 'debug', '', '', 5, 2, 2, 1, NULL, 0),
       (1164733399669962301, 0, 'report', '报表管理', 'menu', '/report', 'iconfont icon-shujuzhanshi2', 5, 1, 0, 1, NULL,
        0),
       (1164733399669962302, 1164733399669962301, 'report_setting', '报表配置', 'menu',
        'http://localhost:8108/ureport/designer', 'iconfont icon-rizhi', 1, 1, 0, 1, NULL, 0),
       (1164733399669962303, 1164733399669962301, 'report_list', '报表列表', 'menu', '/report/reportlist',
        'iconfont icon-biaodan', 2, 1, 0, 1, NULL, 0);
COMMIT;


-- ----------------------------
-- Table structure for sakura_param
-- ----------------------------
DROP TABLE IF EXISTS `sakura_param`;
CREATE TABLE `sakura_param`
(
    `id`          bigint(20) NOT NULL COMMENT '主键',
    `param_name`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数名',
    `param_key`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数键',
    `param_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数值',
    `remark`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
    `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
    `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
    `status`      int(2) NULL DEFAULT NULL COMMENT '状态',
    `is_deleted`  int(2) NULL DEFAULT 0 COMMENT '是否已删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '参数表';

-- ----------------------------
-- Records of sakura_param
-- ----------------------------
BEGIN;
INSERT INTO `sakura_param`
VALUES (1123598819738675201, '是否开启注册功能', 'account.registerUser', 'true', '开启注册', 1123598821738675201,
        1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0),
       (1123598819738675202, '账号初始密码', 'account.initPassword', '123456', '初始密码', 1123598821738675201,
        1123598813738675201, '2018-12-28 12:19:01', 1123598821738675201, '2018-12-28 12:19:01', 1, 0);
COMMIT;


-- ----------------------------
-- Table structure for sakura_post
-- ----------------------------
DROP TABLE IF EXISTS `sakura_post`;
CREATE TABLE `sakura_post`
(
    `id`          bigint(20) NOT NULL COMMENT '主键',
    `tenant_id`   varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
    `category`    int(11) NULL DEFAULT NULL COMMENT '岗位类型',
    `post_code`   varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位编号',
    `post_name`   varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位名称',
    `sort`        int(2) NULL DEFAULT NULL COMMENT '岗位排序',
    `remark`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位描述',
    `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
    `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
    `status`      int(2) NULL DEFAULT NULL COMMENT '状态',
    `is_deleted`  int(2) NULL DEFAULT NULL COMMENT '是否已删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '岗位表';

-- ----------------------------
-- Records of sakura_post
-- ----------------------------
BEGIN;
INSERT INTO `sakura_post`
VALUES (1123598817738675201, '000000', 1, 'ceo', '首席执行官', 1, '总经理', 1123598821738675201, 1123598813738675201,
        '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0),
       (1123598817738675202, '000000', 1, 'coo', '首席运营官', 2, '常务总经理', 1123598821738675201, 1123598813738675201,
        '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0),
       (1123598817738675203, '000000', 1, 'cfo', '首席财务官', 3, '财务总经理', 1123598821738675201, 1123598813738675201,
        '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0),
       (1123598817738675204, '000000', 1, 'cto', '首席技术官', 4, '技术总监', 1123598821738675201, 1123598813738675201,
        '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0),
       (1123598817738675205, '000000', 1, 'cio', '首席信息官', 5, '信息总监', 1123598821738675201, 1123598813738675201,
        '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0),
       (1123598817738675206, '000000', 2, 'pm', '技术经理', 6, '研发和产品是永远的朋友', 1123598821738675201, 1123598813738675201,
        '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0),
       (1123598817738675207, '000000', 2, 'hrm', '人力经理', 7, '人力资源部门工作管理者', 1123598821738675201, 1123598813738675201,
        '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0),
       (1123598817738675208, '000000', 3, 'staff', '普通员工', 8, '普通员工', 1123598821738675201, 1123598813738675201,
        '2020-04-01 00:00:00', 1123598821738675201, '2020-04-01 00:00:00', 1, 0);
COMMIT;


-- ----------------------------
-- Table structure for sakura_role
-- ----------------------------
DROP TABLE IF EXISTS `sakura_role`;
CREATE TABLE `sakura_role`
(
    `id`         bigint(20) NOT NULL COMMENT '主键',
    `tenant_id`  varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
    `parent_id`  bigint(20) NULL DEFAULT 0 COMMENT '父主键',
    `role_name`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色名',
    `sort`       int(11) NULL DEFAULT NULL COMMENT '排序',
    `role_alias` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色别名',
    `is_deleted` int(2) NULL DEFAULT 0 COMMENT '是否已删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表';

-- ----------------------------
-- Records of sakura_role
-- ----------------------------
BEGIN;
INSERT INTO `sakura_role`
VALUES (1123598816738675201, '000000', 0, '超级管理员', 1, 'administrator', 0),
       (1123598816738675202, '000000', 0, '用户', 2, 'user', 0);
COMMIT;

-- ----------------------------
-- Table structure for sakura_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sakura_role_menu`;
CREATE TABLE `sakura_role_menu`
(
    `id`      bigint(20) NOT NULL COMMENT '主键',
    `menu_id` bigint(20) NULL DEFAULT NULL COMMENT '菜单id',
    `role_id` bigint(20) NULL DEFAULT NULL COMMENT '角色id',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色菜单表';

-- ----------------------------
-- Records of sakura_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `sakura_role_menu`
VALUES (1123598817738675201, 1123598815738675201, 1123598816738675201),
       (1123598817738675202, 1123598815738675202, 1123598816738675201),
       (1123598817738675203, 1123598815738675203, 1123598816738675201),
       (1123598817738675204, 1123598815738675204, 1123598816738675201),
       (1123598817738675205, 1123598815738675205, 1123598816738675201),
       (1123598817738675206, 1123598815738675206, 1123598816738675201),
       (1123598817738675207, 1123598815738675207, 1123598816738675201),
       (1123598817738675208, 1123598815738675208, 1123598816738675201),
       (1123598817738675209, 1123598815738675209, 1123598816738675201),
       (1123598817738675210, 1123598815738675210, 1123598816738675201),
       (1123598817738675211, 1123598815738675211, 1123598816738675201),
       (1123598817738675212, 1123598815738675212, 1123598816738675201),
       (1123598817738675213, 1123598815738675213, 1123598816738675201),
       (1123598817738675214, 1123598815738675214, 1123598816738675201),
       (1123598817738675215, 1123598815738675215, 1123598816738675201),
       (1123598817738675216, 1123598815738675216, 1123598816738675201),
       (1123598817738675217, 1123598815738675217, 1123598816738675201),
       (1123598817738675218, 1123598815738675218, 1123598816738675201),
       (1123598817738675219, 1123598815738675219, 1123598816738675201),
       (1123598817738675220, 1123598815738675220, 1123598816738675201),
       (1123598817738675221, 1123598815738675221, 1123598816738675201),
       (1123598817738675222, 1123598815738675222, 1123598816738675201),
       (1123598817738675223, 1123598815738675223, 1123598816738675201),
       (1123598817738675224, 1123598815738675224, 1123598816738675201),
       (1123598817738675225, 1123598815738675225, 1123598816738675201),
       (1123598817738675226, 1123598815738675226, 1123598816738675201),
       (1123598817738675227, 1123598815738675227, 1123598816738675201),
       (1123598817738675228, 1123598815738675228, 1123598816738675201),
       (1123598817738675229, 1123598815738675229, 1123598816738675201),
       (1123598817738675230, 1123598815738675230, 1123598816738675201),
       (1123598817738675231, 1123598815738675231, 1123598816738675201),
       (1123598817738675232, 1123598815738675232, 1123598816738675201),
       (1123598817738675233, 1123598815738675233, 1123598816738675201),
       (1123598817738675234, 1123598815738675234, 1123598816738675201),
       (1123598817738675235, 1123598815738675235, 1123598816738675201),
       (1123598817738675236, 1123598815738675236, 1123598816738675201),
       (1123598817738675237, 1123598815738675237, 1123598816738675201),
       (1123598817738675238, 1123598815738675238, 1123598816738675201),
       (1123598817738675239, 1123598815738675239, 1123598816738675201),
       (1123598817738675240, 1123598815738675240, 1123598816738675201),
       (1123598817738675241, 1123598815738675241, 1123598816738675201),
       (1123598817738675242, 1123598815738675242, 1123598816738675201),
       (1123598817738675243, 1123598815738675243, 1123598816738675201),
       (1123598817738675244, 1123598815738675244, 1123598816738675201),
       (1123598817738675245, 1123598815738675245, 1123598816738675201),
       (1123598817738675246, 1123598815738675246, 1123598816738675201),
       (1123598817738675247, 1123598815738675247, 1123598816738675201),
       (1123598817738675248, 1123598815738675248, 1123598816738675201),
       (1123598817738675249, 1123598815738675249, 1123598816738675201),
       (1123598817738675250, 1123598815738675250, 1123598816738675201),
       (1123598817738675251, 1123598815738675251, 1123598816738675201),
       (1123598817738675252, 1123598815738675252, 1123598816738675201),
       (1123598817738675253, 1123598815738675253, 1123598816738675201),
       (1123598817738675254, 1123598815738675254, 1123598816738675201),
       (1123598817738675255, 1123598815738675255, 1123598816738675201),
       (1123598817738675256, 1123598815738675256, 1123598816738675201),
       (1123598817738675257, 1123598815738675257, 1123598816738675201),
       (1123598817738675258, 1123598815738675258, 1123598816738675201),
       (1123598817738675259, 1123598815738675259, 1123598816738675201),
       (1123598817738675260, 1123598815738675260, 1123598816738675201),
       (1123598817738675261, 1123598815738675261, 1123598816738675201),
       (1123598817738675262, 1123598815738675262, 1123598816738675201),
       (1123598817738675263, 1123598815738675263, 1123598816738675201),
       (1123598817738675264, 1123598815738675264, 1123598816738675201),
       (1123598817738675265, 1123598815738675265, 1123598816738675201),
       (1123598817738675266, 1123598815738675266, 1123598816738675201),
       (1123598817738675267, 1123598815738675267, 1123598816738675201),
       (1123598817738675268, 1123598815738675268, 1123598816738675201),
       (1123598817738675269, 1123598815738675269, 1123598816738675201),
       (1123598817738675270, 1123598815738675270, 1123598816738675201),
       (1161272893875225001, 1164733389668962251, 1123598816738675201),
       (1161272893875225002, 1164733389668962252, 1123598816738675201),
       (1161272893875225003, 1164733389668962253, 1123598816738675201),
       (1161272893875225004, 1164733389668962254, 1123598816738675201),
       (1161272893875225005, 1164733389668962255, 1123598816738675201),
       (1161272893875225006, 1164733389668962256, 1123598816738675201),
       (1161272893875226001, 1164733399668962201, 1123598816738675201),
       (1161272893875226002, 1164733399668962202, 1123598816738675201),
       (1161272893875226003, 1164733399668962203, 1123598816738675201),
       (1161272893875226004, 1164733399668962204, 1123598816738675201),
       (1161272893875226005, 1164733399668962205, 1123598816738675201),
       (1161272893875226006, 1164733399668962206, 1123598816738675201),
       (1161272893875226007, 1164733399668962207, 1123598816738675201),
       (1161272893875228001, 1164733399669962301, 1123598816738675201),
       (1161272893875228002, 1164733399669962302, 1123598816738675201),
       (1161272893875228003, 1164733399669962303, 1123598816738675201),
       (1296030340342616066, 1123598815738675201, 1123598816738675202),
       (1296030340367781890, 1123598815738675202, 1123598816738675202),
       (1296030340384559105, 1123598815738675219, 1123598816738675202),
       (1296030340401336321, 1123598815738675220, 1123598816738675202),
       (1296030340413919233, 1123598815738675221, 1123598816738675202),
       (1296030340434890753, 1123598815738675222, 1123598816738675202),
       (1455363615489028098, 1123598815738675307, 1123598816738675201),
       (1455363615505805313, 1123598815738675309, 1123598816738675201),
       (1455363615518388225, 1123598815738675310, 1123598816738675201);
COMMIT;


-- ----------------------------
-- Table structure for sakura_tenant
-- ----------------------------
DROP TABLE IF EXISTS `sakura_tenant`;
CREATE TABLE `sakura_tenant`
(
    `id`             bigint(20) NOT NULL COMMENT '主键',
    `tenant_id`      varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户ID',
    `tenant_name`    varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '租户名称',
    `domain`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '域名地址',
    `linkman`        varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系人',
    `contact_number` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系电话',
    `address`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系地址',
    `create_user`    bigint(20) NULL DEFAULT NULL COMMENT '创建人',
    `create_dept`    bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
    `create_time`    datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_user`    bigint(20) NULL DEFAULT NULL COMMENT '修改人',
    `update_time`    datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
    `status`         int(2) NULL DEFAULT NULL COMMENT '状态',
    `is_deleted`     int(2) NULL DEFAULT 0 COMMENT '是否已删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '租户表';

-- ----------------------------
-- Records of sakura_tenant
-- ----------------------------
BEGIN;
INSERT INTO `sakura_tenant`
VALUES (1123598820738675201, '000000', '管理组', '', 'admin', '666666', '管理组', 1123598821738675201, 1123598813738675201,
        '2019-01-01 00:00:39', 1123598821738675201, '2019-01-01 00:00:39', 1, 0);
COMMIT;

-- ----------------------------
-- Table structure for sakura_user
-- ----------------------------
DROP TABLE IF EXISTS `sakura_user`;
CREATE TABLE `sakura_user`
(
    `id`          bigint(20) NOT NULL COMMENT '主键',
    `tenant_id`   varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '000000' COMMENT '租户ID',
    `code`        varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户编号',
    `account`     varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '账号',
    `password`    varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
    `name`        varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
    `real_name`   varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真名',
    `avatar`      varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
    `email`       varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱',
    `phone`       varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机',
    `birthday`    datetime(0) NULL DEFAULT NULL COMMENT '生日',
    `sex`         smallint(6) NULL DEFAULT NULL COMMENT '性别',
    `role_id`     varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色id',
    `dept_id`     varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门id',
    `post_id`     varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '岗位id',
    `create_user` bigint(20) NULL DEFAULT NULL COMMENT '创建人',
    `create_dept` bigint(20) NULL DEFAULT NULL COMMENT '创建部门',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_user` bigint(20) NULL DEFAULT NULL COMMENT '修改人',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
    `status`      int(2) NULL DEFAULT NULL COMMENT '状态',
    `is_deleted`  int(2) NULL DEFAULT 0 COMMENT '是否已删除',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表';

-- ----------------------------
-- Records of sakura_user
-- ----------------------------
BEGIN;
INSERT INTO `sakura_user`
VALUES (1123598821738675201, '000000', NULL, 'admin', '90b9aa7e25f80cf4f64e990b78a9fc5ebd6cecad', '管理员', '管理员', '',
        'admin@sakurax.vip', '22233322', '2018-08-08 00:00:00', 1, '1123598816738675201', '1123598813738675201',
        '1123598817738675201', 1123598821738675201, 1123598813738675201, '2018-08-08 00:00:00', 1123598821738675201,
        '2018-08-08 00:00:00', 1, 0);
COMMIT;


